package study.saas.order.service;


import study.saas.common.dto.CommodityPageDTO;
import study.saas.common.viewmodel.PageResult;
import study.saas.order.entity.Commodity;

import java.util.List;

public interface CommodityService {
    void add(Commodity commodity);

    void update(Commodity commodity);

    Commodity getById(Integer id);

//    PageResult getByPage(CommodityPageDTO commodityPageDTO);

    void updateStatus(Integer status, Integer id);

    void updateAmount(Integer amount, Integer id);

    void deleteByIds(List<Integer> ids);

    Commodity getByName(String commodityName);

    PageResult getByPageByJpa(CommodityPageDTO commodityPageDTO);

    void deleteByName(String commodityName);
}
